<template>
    <el-tag :type="gameData.class">{{ gameData.label }}</el-tag>
</template>

<script>
    export default {
        props: ['data'],
        data () {
            return {
                type: this.$store.state.appSource.options.type,
            };
        },
        watch: {},
        computed: {
            gameData() {
                // let tmp = {
                //     label: this.data,
                //     value: this.data,
                // }
                let tmp = this.type[this.data];
                // for (let i in this.type) {
                //     if (this.type[i].value === this.data) {
                //         tmp = this.type[i];
                //         break;
                //     }
                // }
                return tmp;
            },
        },
        methods: {

        },
        created() {

        }
    }
</script>

<style scoped>

</style>
